package com.elm.mapper;

import com.elm.po.Orders;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface OrdersMapper {
    int createOrders(String userId, Integer businessId, Integer daId, Double orderTotal);
    Orders getOrdersById(Integer orderId);
    List<Orders> getOrdersByUserId(String userId);
    int addComment(Integer orderId, String comment, Integer star, String userId);
    List<Orders> getAllCommentsByBusinessId(Integer businessId);
    List<Orders> getAllComments(String userId);
    int deleteComment(Integer orderId, String userId);
    List<Orders> getAllOrders(Integer businessId, String userId);
    List<Orders> getAllPaidOrders(Integer businessId, String userId);
    List<Orders> getAllEndedOrders(Integer businessId, String userId);
    int handleOrders(Integer businessId, Integer orderId, String userId);
	int updateComment(Integer orderId, String comment, Integer star, String currentUserId);
} 